package com.yboot.starter.shiro.core.realm;

import org.apache.shiro.authc.AuthenticationToken;

// 自定义SmsCodeToken
public class SmsCodeToken implements AuthenticationToken {

    private final String phone;
    private final String code;

    public SmsCodeToken(String phone, String code) {
        this.phone = phone;
        this.code = code;
    }

    @Override
    public Object getPrincipal() {
        return this.phone;
    }

    @Override
    public Object getCredentials() {
        return this.code;
    }

    public String getPhone() {
        return phone;
    }

    public String getCode() {
        return code;
    }
}
